﻿<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>奋青网-帖子详情</title>
<link href="css/Main.css" rel="stylesheet" type="text/css" />
<link href="css/Post.css" rel="stylesheet" type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
<link href="css/boxy.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/Jquery-1-5-2.js"></script>
<script type="text/javascript" src="js/Main.js"></script>
<script type="text/javascript" src="js/QApage.js"></script>
<script type="text/javascript" src="js/jquery.boxy.js"></script>
<script src="js/redactor/redactor.js"></script>
<link href="js/redactor/css/redactor.css" rel="stylesheet"  type="text/css" />
<script type="text/javascript">
<!--
	window.srid ; //回复编号
	
	function scdid(cdid){
		window.srid = cdid ;
		window.wid = null ;
	}
	window.rid ;
	window.chart ;
	function rep(str){    //举报表
		window.chart = str ;
	}
	function report(rid){  //举报编号
		window.rid = rid ;
	}
	//投票
		function ps1(wid){
			var xmlurl = "${applicationScope.path }/QApage?action=lb&type=a&cdid="+wid ;
			$.ajax({
					type:"POST" ,
					url:xmlurl ,
					dateType:"html" ,
					async:true ,
					success:call ,
					error:err
				});
			function call(a){
				var ps = document.getElementById('ps');
				ps.innerHTML = a ;
			}
			function err(xml){
			alert(xml.readyState);
			alert(xml.status);
			}
		};
		function ps2(wid){
			$.ajax({
				type:"POST" ,
				url:"QApage?action=lb&type=dis&cdid="+wid ,
				dataType:"html",
				async:false ,
				success:success
			});
			function success(a){
				var ps2 = document.getElementById('dis');
				ps2.innerHTML = a ;
			}
		}
		function seek(name){    //搜索在线人员
			name = encodeURI(name);
			$.ajax({
				type:"POST" ,
				url:"QApage?action=seek&name="+name ,
				dateType:"html" ,
				async:false ,
				success:seek 
			});
			function seek(list){
				var ul = document.getElementById('User_Result');
				ul.innerHTML = list ;
			}
		}
-->
</script>
<script type="text/javascript">
<!--
	function getType(){
		var type = document.form1.type ;
		var action = document.form1.action ;
		action = action.value ;
		var form = document.form1 ;
		if(type.value==2){
			form.action="${applicationScope.path }/Active";
		}else if(type.value==1){
			form.action="${applicationScope.path }/ArticleList";
		}else if(type.value==0){
			form.action="${applicationScope.path }/ClubList";
		}
	}
-->
</script>
</head>
<body>
<div id="Top">
  <div class="Top_all"> <a href="#"><img src="images/LOGO.jpg"/></a>
    <ul id="Top_Nav">
      <li><a href="${applicationScope.path }/Index">首页</a></li>
      <li><a href="${applicationScope.path }/ArticleList">领域</a></li>
      <li><a href="#">发现</a></li>
    </ul>
    <ul id="Second_Menu">
      	<li><a href="${applicationScope.path }/ClubList">发现社团</a><li>
      	<li><a href="#">对味奋青</a><li>
      	<li><a href="${applicationScope.path }/Active">有趣活动</a><li>
      </ul>
    <div id="Search">
      <div class="Search_l"></div>
      <form name="form1" method="post" action="" onsubmit="getType();">
      	<input type="hidden" name="action" value="search" />
        <input type="text" id="Search_Box" name="content" value="搜索社团、文章、活动..."/>
        <img src="images/search_btn.jpg" id="Search_Btn"/>
        <input type="hidden" value="0" id="Search_What" name="type"/>  <!--传送搜索类型参数-->
      </form>
    </div>
    <div id="Search_Option">
    	<p class="Search_Option_Hover"><img src="images/search_hover0.jpg"/>包含<span></span>的社团</p>
    	<p><img src="images/search_hover1.jpg"/>包含<span></span>的帖子</p>
    	<p><img src="images/search_hover2.jpg"/>包含<span></span>的活动</p>
    </div>
    <div id="User_Top">
    <c:choose>
    	<c:when test="${not empty sessionScope.user}">
    	<c:forEach items="${requestScope.login}" var="login">
    		<img src="${login.uphoto}"/><a href="#">${login.uname}</a>
        	<ul id="User_Info_Box">
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}"><img src="images/home.jpg"/>个人主页</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=private"><img src="images/sms.jpg"/>私信</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=edit"><img src="images/control.jpg"/>设置</a></li>
	        	<li><a href="${applicationScope.path }/Logout.jsp"><img src="images/logout.jpg"/>注销</a></li>
        	</ul>
        </c:forEach>
    	</c:when>
   	 	<c:otherwise>
    		<a href="${applicationScope.path }/Entrance.jsp">您还未登录</a>
    	</c:otherwise>
    </c:choose>
    </div>
    <img src="images/help.jpg" id="Help_Btn" title="帮助中心"/> </div>
</div>
<!--头部结束-->
<div class="Page_Top"></div>
<div class="Page_Middle">
  <div class="Page_Left">
  <c:forEach items="${requestScope.card}" var="card">
    <p class="Page_Title">${card.cdtitle}</p>
    <div class="Title_Line"></div>
    <div class="Page_Main">
    	<a href="${applicationScope.path }/Pro?uid=${card.uid}"><img src="${card.uphoto}" class="User_Pic"/></a>
        <div class="Page_Main_All">
        <div class="Digg">
       	  <p style="border-bottom:2px solid #FFF;"><img src="images/digg.jpg" align="absmiddle" onclick="ps1(${card.cdid});"/><span id="ps">${card.cdagree}</span>人支持</p>
          <p><img src="images/bury.jpg" align="absmiddle" onclick="ps2(${card.cdid});" /><span id="dis">${card.cddisagree}</span>人反对</p>
        </div>
    	<div class="Tringle_P"></div>
        	<div class="Page_Main_Middle">
            <p class="User_Title"><a href="${applicationScope.path }/Pro?uid=${card.uid}">${card.uname}</a>（${card.uinfo}）</p>
            <p class="Article_Info">领域：${card.ftype}&nbsp;&nbsp;&nbsp;&nbsp;标签：${card.cdtag}&nbsp;&nbsp;&nbsp;&nbsp;发布时间：${card.cdtime }<span class="Hidden_Info"><span class="Warming" onclick="report(${card.cdid});rep('card');">举报</span><span class="Law" title="署名-非商业使用-禁止演绎">&nbsp;</span></span></p>
            　		${card.cdcontent}
            </div>
        	<div class="Page_Main_Bottom"></div>
        </div>
    </div>
    </c:forEach>
    <c:forEach items="${requestScope.review}" var="re" >
    <div class="Page_Main">
    	<a href="${applicationScope.path }/Pro?uid=${re.uid}"><img src="${re.uphoto}" class="User_Pic"/></a>
        <div class="Reply_Main_All">
    	<div class="Tringle_R"></div>
        	<div class="Reply_Main_Middle">
            <p class="User_Title"><a href="${applicationScope.path }/Pro?uid=${re.uid}">${re.uname}</a>（${re.uinfo}）</p>
            　　	${re.rcontent}
            <p class="Comment_Info">发表时间：${re.date2}<span class="Comment" onclick="scdid(${re.rid});">追加评论</span><span class="Hidden_Info"><span class="Warming" onclick="report(${re.rid});rep('review');">举报</span></span></p>
            </div>
        	<div class="Reply_Main_Bottom"></div>
        </div>
    </div>
    </c:forEach>
    <div class="Pages">
        <a href="?pid=${requestScope.pid }&&page=1" class="Pages_a">首  页</a>
    	<c:choose>
        	<c:when test="${requestScope.page>1 }">
        		<a href="?pid=${requestScope.pid }&&page=${requestScope.page -1 }" class="Pages_a">上一页</a>
        	</c:when>
        	<c:otherwise>
				<a class="Pages_a">上一页</a>        	
        	</c:otherwise>
        </c:choose>
        <c:choose>
        <c:when test="${requestScope.page+1>requestScope.csize}">
        <a class="Pages_a">下一页</a>
        <a href="?pid=${requestScope.pid }&page=${requestScope.csize }" class="Pages_a">末页</a>
        </c:when>
        	<c:otherwise>
        		<a href="?pid=${requestScope.pid }&page=${requestScope.page +1 }" class="Pages_a">下一页</a>
        		<a href="?pid=${requestScope.pid }&&page=${requestScope.csize }" class="Pages_a">末页</a>
        	</c:otherwise>
        </c:choose>
    </div>
    <form style="clear:both;width:670px;" method="post" action="QApage">
     	<input type="hidden" name="action" value="reply" />
     	<input type="hidden" value="${requestScope.pid}" name="pid"/>
    <textarea id="redactor_content" name="content" style="height:150px;"></textarea>
    <input type="submit" class="Blue_Button" value="提交" />
    </form>
  </div>
  <div class="Page_Right">
  	<input type="button" class="Green_Button" value="立即回复"/><br/>
    <div class="Invite_Box">
    	<p align="center">将文章推荐给他人</p>
    	<input type="text" id="Invite_Input" value="搜索人名、社团..." onfocus='if(this.value=="搜索人名、社团...")this.value="";' onblur='if(this.value=="")this.value="搜索人名、社团..."' onchange="seek(this.value);"/>
        <ul id="User_Result">
        </ul>
    </div>
    <div class="Page_Tops">
    	<div class="Page_Tops_Title">
        	<p>同领域热帖</p>
        </div>
    	<ul>
        	<c:forEach items="${requestScope.shot}" var="card" varStatus="s">
    		<c:choose>
    			<c:when test="${s.index+1<=3}">
				        <li><span class="Page_Tops_Code1">${s.index+1}</span><a href="?pid=${card.cdid}">${card.cdtitle}</a></li>
				</c:when>
				<c:otherwise>
				        <li><span class="Page_Tops_Code2">${s.index+1}</span><a href="?pid=${card.cdid}">${card.cdtitle}</a></li>
				</c:otherwise>
			</c:choose>
          	</c:forEach>
        </ul>
    </div>
    <div class="Page_Tops">
    	<div class="Page_Tops_Title">
        	<p>热帖总榜</p>
        </div>
    	<ul>
        	<c:forEach items="${requestScope.hot}" var="card" varStatus="s">
    		<c:choose>
    			<c:when test="${s.index+1<=3}">
				        <li><span class="Page_Tops_Code1">${s.index+1}</span><a href="?pid=${card.cdid}">${card.cdtitle}</a></li>
				</c:when>
				<c:otherwise>
				        <li><span class="Page_Tops_Code2">${s.index+1}</span><a href="?pid=${card.cdid}">${card.cdtitle}</a></li>
				</c:otherwise>
			</c:choose>
          	</c:forEach>
        </ul>
    </div>
  </div>
</div>
<div class="Page_Bottom"></div>
<div class="Bottom">
  <p><a href="#"><img src="images/LOGO_gray.jpg" align="left"/></a> <a href="#">奋青首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">社团中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">交流圈子</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">活动中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">帮助中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">使用反馈</a>&nbsp;&nbsp;|&nbsp;&nbsp;联系我们：<a href="mailto:scdzwyxst@gmail.com">scdzwyxst@gmail.com</a>&nbsp;&nbsp;<br />
    CopyRight&copy;&nbsp;2012&nbsp;MayDay  All Rights Reserved</p>
</div>
</body>
</html>
